package string;

/**
 * @Author Klys
 * @Date 2023/4/4 0:52
 * @Description
 * @Version 1.0
 */

/**
 * string常用相关方法
 */
public class Demo02 {

    public int filed01;

    public Demo02 test() {
        return this;
    }

    @Override
    public String toString() {
        return "Demo02{" +
                "filed01=" + filed01 +
                '}';
    }

    public static void main(String[] args) {
        //String转char数组
        String s = new String("我是klys");
        char[] chars = s.toCharArray();
        System.out.println(chars);

        //返回当前对象
        Demo02 demo02 = new Demo02().test();
        System.out.println(demo02);
    }
}
